<?php

// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.application.component.model' );

class ClaimModelClaim extends JModel
{

	function saveClaim($maSV, $type, $content) {
		$db = &JFactory::getDBO();
		echo $maSV;
		echo $type;
		echo $content;
		echo $maSV;
		
		$claim = new StdClass();
		$claim->maSV = $maSV;
		$claim->maloai = $type;
		$claim->noidung = $content;
		$db->insertObject("#__hongbang_donsv", $claim);
	}
	
	function findAll() {
		$db = &JFactory::getDBO();
		$query = "SELECT * FROM #__hongbang_donsv";
		$db->setQuery($query);
		$rows = $db->loadObjectList();
//		foreach ($rows as $row) {
//			echo $row->masv;
//		}
//		echo "Load result list no error";
		return $rows;
	}

}